package com.am.meeting.controller;


import com.am.common.exception.DbException;
import com.am.meeting.domain.Result;

import com.am.meeting.domain.po.Tags;
import com.am.meeting.domain.vo.TagsVo;
import com.am.meeting.service.impl.TagsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.sql.SQLException;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cq
 * @since 2025-02-10
 */
@RestController
@RequestMapping("/tags")
public class TagsController {
@Autowired
TagsServiceImpl tagsService;

    @GetMapping("/allTags")
    protected Result AllTags(){
        try {
            List<Tags> list = tagsService.list(null);
            return Result.success(list);
        }catch (DbException dbException){
            throw new DbException("获取数据异常");
        }

    }



}
